import Vue from 'vue'
import VueRouter from 'vue-router'

/**
 *
 * @returns {Promise<*>|*}
 * @constructor
  懒加载会出Loading CSS chunk chunk-6842d40a failed. 错误,暂未解决
const Home = () => import('../views/home/Home.vue')
const WordBook = () => import('../views/WordBook/WordBook.vue')
const Content = () => import('../views/WordBook/Content.vue')
const Word = () => import('../views/word/Word.vue')
const Me = () => import('../views/me/Me.vue')
 */

import Home from'../views/home/Home.vue'
import WordBook from'../views/WordBook/WordBook.vue'
import Content from'../views/WordBook/Content.vue'
import Word from'../views/word/Word.vue'
import Me from'../views/me/Me.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/wordbook',
    name: 'WordBook',
    component: WordBook
  },
  {
    path: '/word',
    name: 'Word',
    component: Word
  },
  {
    path: '/wordcontent',
    name: 'wordcontent',
    component: Content
  },
  {
    path: '/me',
    name: 'me',
    component: Me
  },
]

const router = new VueRouter({
  routes,
  mode: 'history',
})

export default router
